/*
Navicat SQL Server Data Transfer

Source Server         : sqlserver
Source Server Version : 110000
Source Host           : .:1433
Source Database       : BSAppDone
Source Schema         : dbo

Target Server Type    : SQL Server
Target Server Version : 110000
File Encoding         : 65001

Date: 2020-08-04 10:00:56
*/


-- ----------------------------
-- Table structure for BS_Member
-- ----------------------------
DROP TABLE [dbo].[BS_Member]
GO
CREATE TABLE [dbo].[BS_Member] (
[id] nchar(10) NULL 
)


GO

-- ----------------------------
-- Records of BS_Member
-- ----------------------------

-- ----------------------------
-- Table structure for BS_Sys_Admin
-- ----------------------------
DROP TABLE [dbo].[BS_Sys_Admin]
GO
CREATE TABLE [dbo].[BS_Sys_Admin] (
[Id] int NOT NULL IDENTITY(1,1) ,
[Name] varchar(50) NULL ,
[Nickname] varchar(50) NULL ,
[Password] varchar(100) NULL ,
[Email] varchar(50) NULL ,
[IsDelete] int NULL ,
[CreateTime] int NULL 
)


GO
DBCC CHECKIDENT(N'[dbo].[BS_Sys_Admin]', RESEED, 3)
GO
IF ((SELECT COUNT(*) from fn_listextendedproperty('MS_Description', 
'SCHEMA', N'dbo', 
'TABLE', N'BS_Sys_Admin', 
'COLUMN', N'Id')) > 0) 
EXEC sp_updateextendedproperty @name = N'MS_Description', @value = N'管理员id'
, @level0type = 'SCHEMA', @level0name = N'dbo'
, @level1type = 'TABLE', @level1name = N'BS_Sys_Admin'
, @level2type = 'COLUMN', @level2name = N'Id'
ELSE
EXEC sp_addextendedproperty @name = N'MS_Description', @value = N'管理员id'
, @level0type = 'SCHEMA', @level0name = N'dbo'
, @level1type = 'TABLE', @level1name = N'BS_Sys_Admin'
, @level2type = 'COLUMN', @level2name = N'Id'
GO

-- ----------------------------
-- Records of BS_Sys_Admin
-- ----------------------------
SET IDENTITY_INSERT [dbo].[BS_Sys_Admin] ON
GO
INSERT INTO [dbo].[BS_Sys_Admin] ([Id], [Name], [Nickname], [Password], [Email], [IsDelete], [CreateTime]) VALUES (N'1', N'admin', N'曾繁华', N'123456', N'290475886', N'0', N'646')
GO
GO
INSERT INTO [dbo].[BS_Sys_Admin] ([Id], [Name], [Nickname], [Password], [Email], [IsDelete], [CreateTime]) VALUES (N'2', N'admin1', N'曾小烦', N'123456', null, N'0', N'456546')
GO
GO
INSERT INTO [dbo].[BS_Sys_Admin] ([Id], [Name], [Nickname], [Password], [Email], [IsDelete], [CreateTime]) VALUES (N'3', N'admin2', N'曾小烦', N'123456', null, N'0', N'456464')
GO
GO
SET IDENTITY_INSERT [dbo].[BS_Sys_Admin] OFF
GO

-- ----------------------------
-- Table structure for BS_Sys_AdminRole
-- ----------------------------
DROP TABLE [dbo].[BS_Sys_AdminRole]
GO
CREATE TABLE [dbo].[BS_Sys_AdminRole] (
[Id] int NOT NULL IDENTITY(1,1) ,
[AdminId] int NULL ,
[RoleId] int NULL ,
[CreateTime] int NULL 
)


GO
DBCC CHECKIDENT(N'[dbo].[BS_Sys_AdminRole]', RESEED, 3)
GO

-- ----------------------------
-- Records of BS_Sys_AdminRole
-- ----------------------------
SET IDENTITY_INSERT [dbo].[BS_Sys_AdminRole] ON
GO
INSERT INTO [dbo].[BS_Sys_AdminRole] ([Id], [AdminId], [RoleId], [CreateTime]) VALUES (N'2', N'2', N'2', N'44564')
GO
GO
INSERT INTO [dbo].[BS_Sys_AdminRole] ([Id], [AdminId], [RoleId], [CreateTime]) VALUES (N'3', N'1', N'1', N'78978')
GO
GO
SET IDENTITY_INSERT [dbo].[BS_Sys_AdminRole] OFF
GO

-- ----------------------------
-- Table structure for BS_Sys_Operation
-- ----------------------------
DROP TABLE [dbo].[BS_Sys_Operation]
GO
CREATE TABLE [dbo].[BS_Sys_Operation] (
[Id] int NOT NULL IDENTITY(1,1) ,
[Name] varchar(50) NULL ,
[Right] text NULL ,
[ParentId] int NULL ,
[CreateTime] int NULL ,
[Icon] varchar(20) NULL ,
[IsMenu] int NULL ,
[Sort] int NULL DEFAULT ((0)) ,
[IsTopClickMenu] int NULL DEFAULT ((0)) 
)


GO
DBCC CHECKIDENT(N'[dbo].[BS_Sys_Operation]', RESEED, 13)
GO

-- ----------------------------
-- Records of BS_Sys_Operation
-- ----------------------------
SET IDENTITY_INSERT [dbo].[BS_Sys_Operation] ON
GO
INSERT INTO [dbo].[BS_Sys_Operation] ([Id], [Name], [Right], [ParentId], [CreateTime], [Icon], [IsMenu], [Sort], [IsTopClickMenu]) VALUES (N'1', N'首页', N'AdminAreas@HomeController@Main', N'0', N'1313', N'fa fa-home', N'1', N'10000', N'1')
GO
GO
INSERT INTO [dbo].[BS_Sys_Operation] ([Id], [Name], [Right], [ParentId], [CreateTime], [Icon], [IsMenu], [Sort], [IsTopClickMenu]) VALUES (N'2', N'管理员管理', N'null', N'0', N'1231', N'fa fa-lemon-o', N'1', N'0', N'0')
GO
GO
INSERT INTO [dbo].[BS_Sys_Operation] ([Id], [Name], [Right], [ParentId], [CreateTime], [Icon], [IsMenu], [Sort], [IsTopClickMenu]) VALUES (N'3', N'管理员', N'AdminAreas@AdminController@Index', N'2', N'131', N'fa fa-circle-o', N'1', N'0', N'0')
GO
GO
INSERT INTO [dbo].[BS_Sys_Operation] ([Id], [Name], [Right], [ParentId], [CreateTime], [Icon], [IsMenu], [Sort], [IsTopClickMenu]) VALUES (N'4', N'管理员操作', N'AdminAreas@AdminController@GetData,AdminAreas@AdminController@Save,AdminAreas@AdminController@GetAdminInfo,AdminAreas@AdminController@GetALLRoles', N'3', N'132', N'fa fa-circle-o', N'0', N'0', N'0')
GO
GO
INSERT INTO [dbo].[BS_Sys_Operation] ([Id], [Name], [Right], [ParentId], [CreateTime], [Icon], [IsMenu], [Sort], [IsTopClickMenu]) VALUES (N'5', N'角色管理', N'AdminAreas@RoleController@Index', N'2', N'13', N'fa fa-circle-o', N'1', N'0', N'0')
GO
GO
INSERT INTO [dbo].[BS_Sys_Operation] ([Id], [Name], [Right], [ParentId], [CreateTime], [Icon], [IsMenu], [Sort], [IsTopClickMenu]) VALUES (N'6', N'角色操作', N'AdminAreas@RoleController@GetData,AdminAreas@RoleController@Assign,AdminAreas@RoleController@AssignDo', N'5', N'123', N'fa fa-circle-o', N'0', N'0', N'0')
GO
GO
INSERT INTO [dbo].[BS_Sys_Operation] ([Id], [Name], [Right], [ParentId], [CreateTime], [Icon], [IsMenu], [Sort], [IsTopClickMenu]) VALUES (N'7', N'权限资源', N'AdminAreas@OperationController@Index', N'2', N'123', N'fa fa-circle-o', N'1', N'0', N'0')
GO
GO
INSERT INTO [dbo].[BS_Sys_Operation] ([Id], [Name], [Right], [ParentId], [CreateTime], [Icon], [IsMenu], [Sort], [IsTopClickMenu]) VALUES (N'8', N'权限操作', N'AdminAreas@OperationController@GetData,AdminAreas@OperationController@GetALLActions,AdminAreas@OperationController@GetRightById,AdminAreas@OperationController@Save,AdminAreas@OperationController@Menu', N'7', N'123', N'fa fa-circle-o', N'0', N'0', N'0')
GO
GO
INSERT INTO [dbo].[BS_Sys_Operation] ([Id], [Name], [Right], [ParentId], [CreateTime], [Icon], [IsMenu], [Sort], [IsTopClickMenu]) VALUES (N'9', N'菜单', N'', N'0', N'1569456869', N'fa fa-book', N'1', N'0', N'0')
GO
GO
INSERT INTO [dbo].[BS_Sys_Operation] ([Id], [Name], [Right], [ParentId], [CreateTime], [Icon], [IsMenu], [Sort], [IsTopClickMenu]) VALUES (N'10', N'子菜', N'AdminAreas@AdminController@Index', N'9', N'1569457699', N'fa fa-circle-o', N'1', N'0', N'0')
GO
GO
INSERT INTO [dbo].[BS_Sys_Operation] ([Id], [Name], [Right], [ParentId], [CreateTime], [Icon], [IsMenu], [Sort], [IsTopClickMenu]) VALUES (N'11', N'子菜', N'null', N'9', N'1569459673', N'fa fa-circle-o', N'1', N'0', N'0')
GO
GO
INSERT INTO [dbo].[BS_Sys_Operation] ([Id], [Name], [Right], [ParentId], [CreateTime], [Icon], [IsMenu], [Sort], [IsTopClickMenu]) VALUES (N'12', N'子菜', N'null', N'9', N'1569459907', N'fa fa-circle-o', N'1', N'0', N'0')
GO
GO
INSERT INTO [dbo].[BS_Sys_Operation] ([Id], [Name], [Right], [ParentId], [CreateTime], [Icon], [IsMenu], [Sort], [IsTopClickMenu]) VALUES (N'13', N'操作日志', N'', N'2', N'1569539461', N'fa fa-circle-o', N'1', N'0', N'0')
GO
GO
SET IDENTITY_INSERT [dbo].[BS_Sys_Operation] OFF
GO

-- ----------------------------
-- Table structure for BS_Sys_Role
-- ----------------------------
DROP TABLE [dbo].[BS_Sys_Role]
GO
CREATE TABLE [dbo].[BS_Sys_Role] (
[Id] int NOT NULL IDENTITY(1,1) ,
[Name] varchar(50) NULL ,
[Remark] varchar(500) NULL ,
[IsDelete] int NULL ,
[CreateTime] int NULL ,
[OperationList] text NULL 
)


GO
DBCC CHECKIDENT(N'[dbo].[BS_Sys_Role]', RESEED, 2)
GO
IF ((SELECT COUNT(*) from fn_listextendedproperty('MS_Description', 
'SCHEMA', N'dbo', 
'TABLE', N'BS_Sys_Role', 
'COLUMN', N'Id')) > 0) 
EXEC sp_updateextendedproperty @name = N'MS_Description', @value = N'编号'
, @level0type = 'SCHEMA', @level0name = N'dbo'
, @level1type = 'TABLE', @level1name = N'BS_Sys_Role'
, @level2type = 'COLUMN', @level2name = N'Id'
ELSE
EXEC sp_addextendedproperty @name = N'MS_Description', @value = N'编号'
, @level0type = 'SCHEMA', @level0name = N'dbo'
, @level1type = 'TABLE', @level1name = N'BS_Sys_Role'
, @level2type = 'COLUMN', @level2name = N'Id'
GO
IF ((SELECT COUNT(*) from fn_listextendedproperty('MS_Description', 
'SCHEMA', N'dbo', 
'TABLE', N'BS_Sys_Role', 
'COLUMN', N'Name')) > 0) 
EXEC sp_updateextendedproperty @name = N'MS_Description', @value = N'名称'
, @level0type = 'SCHEMA', @level0name = N'dbo'
, @level1type = 'TABLE', @level1name = N'BS_Sys_Role'
, @level2type = 'COLUMN', @level2name = N'Name'
ELSE
EXEC sp_addextendedproperty @name = N'MS_Description', @value = N'名称'
, @level0type = 'SCHEMA', @level0name = N'dbo'
, @level1type = 'TABLE', @level1name = N'BS_Sys_Role'
, @level2type = 'COLUMN', @level2name = N'Name'
GO
IF ((SELECT COUNT(*) from fn_listextendedproperty('MS_Description', 
'SCHEMA', N'dbo', 
'TABLE', N'BS_Sys_Role', 
'COLUMN', N'Remark')) > 0) 
EXEC sp_updateextendedproperty @name = N'MS_Description', @value = N'备注'
, @level0type = 'SCHEMA', @level0name = N'dbo'
, @level1type = 'TABLE', @level1name = N'BS_Sys_Role'
, @level2type = 'COLUMN', @level2name = N'Remark'
ELSE
EXEC sp_addextendedproperty @name = N'MS_Description', @value = N'备注'
, @level0type = 'SCHEMA', @level0name = N'dbo'
, @level1type = 'TABLE', @level1name = N'BS_Sys_Role'
, @level2type = 'COLUMN', @level2name = N'Remark'
GO
IF ((SELECT COUNT(*) from fn_listextendedproperty('MS_Description', 
'SCHEMA', N'dbo', 
'TABLE', N'BS_Sys_Role', 
'COLUMN', N'IsDelete')) > 0) 
EXEC sp_updateextendedproperty @name = N'MS_Description', @value = N'是否删除'
, @level0type = 'SCHEMA', @level0name = N'dbo'
, @level1type = 'TABLE', @level1name = N'BS_Sys_Role'
, @level2type = 'COLUMN', @level2name = N'IsDelete'
ELSE
EXEC sp_addextendedproperty @name = N'MS_Description', @value = N'是否删除'
, @level0type = 'SCHEMA', @level0name = N'dbo'
, @level1type = 'TABLE', @level1name = N'BS_Sys_Role'
, @level2type = 'COLUMN', @level2name = N'IsDelete'
GO

-- ----------------------------
-- Records of BS_Sys_Role
-- ----------------------------
SET IDENTITY_INSERT [dbo].[BS_Sys_Role] ON
GO
INSERT INTO [dbo].[BS_Sys_Role] ([Id], [Name], [Remark], [IsDelete], [CreateTime], [OperationList]) VALUES (N'1', N'超级管理员', null, N'0', N'123', N'ALL')
GO
GO
INSERT INTO [dbo].[BS_Sys_Role] ([Id], [Name], [Remark], [IsDelete], [CreateTime], [OperationList]) VALUES (N'2', N'普通管理员', null, N'0', N'12346', N'1,2,3,4,5,6,7,8,13')
GO
GO
SET IDENTITY_INSERT [dbo].[BS_Sys_Role] OFF
GO

-- ----------------------------
-- Indexes structure for table BS_Sys_Admin
-- ----------------------------

-- ----------------------------
-- Primary Key structure for table BS_Sys_Admin
-- ----------------------------
ALTER TABLE [dbo].[BS_Sys_Admin] ADD PRIMARY KEY ([Id])
GO

-- ----------------------------
-- Indexes structure for table BS_Sys_AdminRole
-- ----------------------------

-- ----------------------------
-- Primary Key structure for table BS_Sys_AdminRole
-- ----------------------------
ALTER TABLE [dbo].[BS_Sys_AdminRole] ADD PRIMARY KEY ([Id])
GO

-- ----------------------------
-- Indexes structure for table BS_Sys_Operation
-- ----------------------------

-- ----------------------------
-- Primary Key structure for table BS_Sys_Operation
-- ----------------------------
ALTER TABLE [dbo].[BS_Sys_Operation] ADD PRIMARY KEY ([Id])
GO

-- ----------------------------
-- Indexes structure for table BS_Sys_Role
-- ----------------------------

-- ----------------------------
-- Primary Key structure for table BS_Sys_Role
-- ----------------------------
ALTER TABLE [dbo].[BS_Sys_Role] ADD PRIMARY KEY ([Id])
GO
